// import router from "../../router/index.js";
import { Api } from "../../api/api.js";
import { reactive } from "vue";
function overviewJS() {
    let status = reactive({
        logList: [],
        findData: {
            limit: 8,
            skip: 1
        }
    });
    let methodFun = {
        getlog() {
            Api.getlog(status.findData).then((res) => {
                res.data.filter((item) => {
                    let a = item.limit == 0 ? "超级管理员" : item.limit == 1 ? "管理员" : "普通用户";
                    let b = item.type == 0 ? "登录" : item.type == 1 ? "发表说说" : "修改说说";
                    let logs = `*${a} ${item.userName} 在${item.createTime} ${b}了`;
                    status.logList.push(logs)
                })
            })
        }
    }
    return {
        status,
        methodFun
    }
}

export default overviewJS;